Integrand size = 19, antiderivative size = 114 \[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^3} \, dx=-\frac {a^2 d \cos (c+d x)}{2 x}-\frac {b^2 x \cos (c+d x)}{d}+2 a b \operatorname {CosIntegral}(d x) \sin (c)-\frac {1}{2} a^2 d^2 \operatorname {CosIntegral}(d x) \sin (c)+\frac {b^2 \sin (c+d x)}{d^2}-\frac {a^2 \sin (c+d x)}{2 x^2}+2 a b \cos (c) \text {Si}(d x)-\frac {1}{2} a^2 d^2 \cos (c) \text {Si}(d x) \]
-1/2*a^2*d*cos(d*x+c)/x-b^2*x*cos(d*x+c)/d+2*a*b*cos(c)*Si(d*x)-1/2*a^2*d^ 2*cos(c)*Si(d*x)+2*a*b*Ci(d*x)*sin(c)-1/2*a^2*d^2*Ci(d*x)*sin(c)+b^2*sin(d *x+c)/d^2-1/2*a^2*sin(d*x+c)/x^2
Time = 0.29 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.87 \[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^3} \, dx=\frac {1}{2} \left (-\frac {a^2 d \cos (c+d x)}{x}-\frac {2 b^2 x \cos (c+d x)}{d}+a \left (4 b-a d^2\right ) \operatorname {CosIntegral}(d x) \sin (c)+\frac {2 b^2 \sin (c+d x)}{d^2}-\frac {a^2 \sin (c+d x)}{x^2}+a \left (4 b-a d^2\right ) \cos (c) \text {Si}(d x)\right ) \]
(-((a^2*d*Cos[c + d*x])/x) - (2*b^2*x*Cos[c + d*x])/d + a*(4*b - a*d^2)*Co sIntegral[d*x]*Sin[c] + (2*b^2*Sin[c + d*x])/d^2 - (a^2*Sin[c + d*x])/x^2 + a*(4*b - a*d^2)*Cos[c]*SinIntegral[d*x])/2
Time = 0.36 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {3820, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^3} \, dx\) |
\(\Big \downarrow \) 3820 |
\(\displaystyle \int \left (\frac {a^2 \sin (c+d x)}{x^3}+\frac {2 a b \sin (c+d x)}{x}+b^2 x \sin (c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {1}{2} a^2 d^2 \sin (c) \operatorname {CosIntegral}(d x)-\frac {1}{2} a^2 d^2 \cos (c) \text {Si}(d x)-\frac {a^2 \sin (c+d x)}{2 x^2}-\frac {a^2 d \cos (c+d x)}{2 x}+2 a b \sin (c) \operatorname {CosIntegral}(d x)+2 a b \cos (c) \text {Si}(d x)+\frac {b^2 \sin (c+d x)}{d^2}-\frac {b^2 x \cos (c+d x)}{d}\) |
-1/2*(a^2*d*Cos[c + d*x])/x - (b^2*x*Cos[c + d*x])/d + 2*a*b*CosIntegral[d *x]*Sin[c] - (a^2*d^2*CosIntegral[d*x]*Sin[c])/2 + (b^2*Sin[c + d*x])/d^2 - (a^2*Sin[c + d*x])/(2*x^2) + 2*a*b*Cos[c]*SinIntegral[d*x] - (a^2*d^2*Co s[c]*SinIntegral[d*x])/2
3.1.54.3.1 Defintions of rubi rules used
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*Sin[(c_.) + (d_.)*(x_ )], x_Symbol] :> Int[ExpandIntegrand[Sin[c + d*x], (e*x)^m*(a + b*x^n)^p, x ], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
Time = 0.37 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.09
method | result | size |
derivativedivides | \(d^{2} \left (a^{2} \left (-\frac {\sin \left (d x +c \right )}{2 d^{2} x^{2}}-\frac {\cos \left (d x +c \right )}{2 d x}-\frac {\operatorname {Si}\left (d x \right ) \cos \left (c \right )}{2}-\frac {\operatorname {Ci}\left (d x \right ) \sin \left (c \right )}{2}\right )+\frac {2 b a \left (\operatorname {Si}\left (d x \right ) \cos \left (c \right )+\operatorname {Ci}\left (d x \right ) \sin \left (c \right )\right )}{d^{2}}+\frac {4 b^{2} c \cos \left (d x +c \right )}{d^{4}}+\frac {\left (3 c +1\right ) b^{2} \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{4}}\right )\) | \(124\) |
default | \(d^{2} \left (a^{2} \left (-\frac {\sin \left (d x +c \right )}{2 d^{2} x^{2}}-\frac {\cos \left (d x +c \right )}{2 d x}-\frac {\operatorname {Si}\left (d x \right ) \cos \left (c \right )}{2}-\frac {\operatorname {Ci}\left (d x \right ) \sin \left (c \right )}{2}\right )+\frac {2 b a \left (\operatorname {Si}\left (d x \right ) \cos \left (c \right )+\operatorname {Ci}\left (d x \right ) \sin \left (c \right )\right )}{d^{2}}+\frac {4 b^{2} c \cos \left (d x +c \right )}{d^{4}}+\frac {\left (3 c +1\right ) b^{2} \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{4}}\right )\) | \(124\) |
risch | \(-\frac {-\cos \left (c \right ) \pi \,\operatorname {csgn}\left (d x \right ) a^{2} d^{4} x^{2}+i \sin \left (c \right ) \pi \,\operatorname {csgn}\left (d x \right ) a^{2} d^{4} x^{2}+2 \cos \left (c \right ) \operatorname {Si}\left (d x \right ) a^{2} d^{4} x^{2}-2 i \sin \left (c \right ) \operatorname {Si}\left (d x \right ) a^{2} d^{4} x^{2}+4 \cos \left (c \right ) \pi \,\operatorname {csgn}\left (d x \right ) a b \,d^{2} x^{2}-4 i \sin \left (c \right ) \pi \,\operatorname {csgn}\left (d x \right ) a b \,d^{2} x^{2}-2 \sin \left (c \right ) \operatorname {Ei}_{1}\left (-i d x \right ) a^{2} d^{4} x^{2}-8 \cos \left (c \right ) \operatorname {Si}\left (d x \right ) a b \,d^{2} x^{2}+8 i \sin \left (c \right ) \operatorname {Si}\left (d x \right ) a b \,d^{2} x^{2}+8 \sin \left (c \right ) \operatorname {Ei}_{1}\left (-i d x \right ) a b \,d^{2} x^{2}+2 \cos \left (d x +c \right ) a^{2} d^{3} x +4 \cos \left (d x +c \right ) b^{2} d \,x^{3}+2 \sin \left (d x +c \right ) a^{2} d^{2}-4 \sin \left (d x +c \right ) b^{2} x^{2}}{4 d^{2} x^{2}}\) | \(247\) |
meijerg | \(\frac {2 b^{2} \sqrt {\pi }\, \sin \left (c \right ) \left (-\frac {1}{2 \sqrt {\pi }}+\frac {\cos \left (d x \right )}{2 \sqrt {\pi }}+\frac {d x \sin \left (d x \right )}{2 \sqrt {\pi }}\right )}{d^{2}}+\frac {2 b^{2} \sqrt {\pi }\, \cos \left (c \right ) \left (-\frac {d x \cos \left (d x \right )}{2 \sqrt {\pi }}+\frac {\sin \left (d x \right )}{2 \sqrt {\pi }}\right )}{d^{2}}+a b \sqrt {\pi }\, \sin \left (c \right ) \left (\frac {2 \gamma +2 \ln \left (x \right )+\ln \left (d^{2}\right )}{\sqrt {\pi }}-\frac {2 \gamma }{\sqrt {\pi }}-\frac {2 \ln \left (2\right )}{\sqrt {\pi }}-\frac {2 \ln \left (\frac {d x}{2}\right )}{\sqrt {\pi }}+\frac {2 \,\operatorname {Ci}\left (d x \right )}{\sqrt {\pi }}\right )+2 a b \cos \left (c \right ) \operatorname {Si}\left (d x \right )+\frac {a^{2} \sqrt {\pi }\, \sin \left (c \right ) d^{2} \left (-\frac {4}{\sqrt {\pi }\, x^{2} d^{2}}-\frac {2 \left (2 \gamma -3+2 \ln \left (x \right )+\ln \left (d^{2}\right )\right )}{\sqrt {\pi }}+\frac {-6 d^{2} x^{2}+4}{\sqrt {\pi }\, x^{2} d^{2}}+\frac {4 \gamma }{\sqrt {\pi }}+\frac {4 \ln \left (2\right )}{\sqrt {\pi }}+\frac {4 \ln \left (\frac {d x}{2}\right )}{\sqrt {\pi }}-\frac {4 \cos \left (d x \right )}{\sqrt {\pi }\, d^{2} x^{2}}+\frac {4 \sin \left (d x \right )}{\sqrt {\pi }\, d x}-\frac {4 \,\operatorname {Ci}\left (d x \right )}{\sqrt {\pi }}\right )}{8}+\frac {a^{2} \sqrt {\pi }\, \cos \left (c \right ) d^{2} \left (-\frac {4 \cos \left (d x \right )}{d x \sqrt {\pi }}-\frac {4 \sin \left (d x \right )}{d^{2} x^{2} \sqrt {\pi }}-\frac {4 \,\operatorname {Si}\left (d x \right )}{\sqrt {\pi }}\right )}{8}\) | \(321\) |
d^2*(a^2*(-1/2*sin(d*x+c)/d^2/x^2-1/2*cos(d*x+c)/d/x-1/2*Si(d*x)*cos(c)-1/ 2*Ci(d*x)*sin(c))+2/d^2*b*a*(Si(d*x)*cos(c)+Ci(d*x)*sin(c))+4/d^4*b^2*c*co s(d*x+c)+(3*c+1)/d^4*b^2*(sin(d*x+c)-cos(d*x+c)*(d*x+c)))
Time = 0.29 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.94 \[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^3} \, dx=-\frac {{\left (a^{2} d^{4} - 4 \, a b d^{2}\right )} x^{2} \operatorname {Ci}\left (d x\right ) \sin \left (c\right ) + {\left (a^{2} d^{4} - 4 \, a b d^{2}\right )} x^{2} \cos \left (c\right ) \operatorname {Si}\left (d x\right ) + {\left (a^{2} d^{3} x + 2 \, b^{2} d x^{3}\right )} \cos \left (d x + c\right ) + {\left (a^{2} d^{2} - 2 \, b^{2} x^{2}\right )} \sin \left (d x + c\right )}{2 \, d^{2} x^{2}} \]
-1/2*((a^2*d^4 - 4*a*b*d^2)*x^2*cos_integral(d*x)*sin(c) + (a^2*d^4 - 4*a* b*d^2)*x^2*cos(c)*sin_integral(d*x) + (a^2*d^3*x + 2*b^2*d*x^3)*cos(d*x + c) + (a^2*d^2 - 2*b^2*x^2)*sin(d*x + c))/(d^2*x^2)
\[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^3} \, dx=\int \frac {\left (a + b x^{2}\right )^{2} \sin {\left (c + d x \right )}}{x^{3}}\, dx \]
Result contains complex when optimal does not.
Time = 2.08 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.32 \[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^3} \, dx=\frac {{\left ({\left (a^{2} {\left (i \, \Gamma \left (-2, i \, d x\right ) - i \, \Gamma \left (-2, -i \, d x\right )\right )} \cos \left (c\right ) + a^{2} {\left (\Gamma \left (-2, i \, d x\right ) + \Gamma \left (-2, -i \, d x\right )\right )} \sin \left (c\right )\right )} d^{4} - 4 \, {\left (a b {\left (i \, \Gamma \left (-2, i \, d x\right ) - i \, \Gamma \left (-2, -i \, d x\right )\right )} \cos \left (c\right ) + a b {\left (\Gamma \left (-2, i \, d x\right ) + \Gamma \left (-2, -i \, d x\right )\right )} \sin \left (c\right )\right )} d^{2}\right )} x^{2} - 2 \, {\left (b^{2} d x^{3} + 2 \, a b d x\right )} \cos \left (d x + c\right ) + 2 \, {\left (b^{2} x^{2} - 2 \, a b\right )} \sin \left (d x + c\right )}{2 \, d^{2} x^{2}} \]
1/2*(((a^2*(I*gamma(-2, I*d*x) - I*gamma(-2, -I*d*x))*cos(c) + a^2*(gamma( -2, I*d*x) + gamma(-2, -I*d*x))*sin(c))*d^4 - 4*(a*b*(I*gamma(-2, I*d*x) - I*gamma(-2, -I*d*x))*cos(c) + a*b*(gamma(-2, I*d*x) + gamma(-2, -I*d*x))* sin(c))*d^2)*x^2 - 2*(b^2*d*x^3 + 2*a*b*d*x)*cos(d*x + c) + 2*(b^2*x^2 - 2 *a*b)*sin(d*x + c))/(d^2*x^2)
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.30 (sec) , antiderivative size = 1058, normalized size of antiderivative = 9.28 \[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^3} \, dx=\text {Too large to display} \]
1/4*(a^2*d^4*x^2*imag_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c)^2 - a^2*d^4*x^2*imag_part(cos_integral(-d*x))*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*a^2*d^4*x^2*sin_integral(d*x)*tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*a^2*d^4*x^ 2*real_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c) - 2*a^2*d^4*x^2*r eal_part(cos_integral(-d*x))*tan(1/2*d*x)^2*tan(1/2*c) - a^2*d^4*x^2*imag_ part(cos_integral(d*x))*tan(1/2*d*x)^2 + a^2*d^4*x^2*imag_part(cos_integra l(-d*x))*tan(1/2*d*x)^2 - 2*a^2*d^4*x^2*sin_integral(d*x)*tan(1/2*d*x)^2 + a^2*d^4*x^2*imag_part(cos_integral(d*x))*tan(1/2*c)^2 - a^2*d^4*x^2*imag_ part(cos_integral(-d*x))*tan(1/2*c)^2 + 2*a^2*d^4*x^2*sin_integral(d*x)*ta n(1/2*c)^2 - 4*a*b*d^2*x^2*imag_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan (1/2*c)^2 + 4*a*b*d^2*x^2*imag_part(cos_integral(-d*x))*tan(1/2*d*x)^2*tan (1/2*c)^2 - 8*a*b*d^2*x^2*sin_integral(d*x)*tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*a^2*d^4*x^2*real_part(cos_integral(d*x))*tan(1/2*c) - 2*a^2*d^4*x^2*real _part(cos_integral(-d*x))*tan(1/2*c) + 8*a*b*d^2*x^2*real_part(cos_integra l(d*x))*tan(1/2*d*x)^2*tan(1/2*c) + 8*a*b*d^2*x^2*real_part(cos_integral(- d*x))*tan(1/2*d*x)^2*tan(1/2*c) - 2*a^2*d^3*x*tan(1/2*d*x)^2*tan(1/2*c)^2 - 4*b^2*d*x^3*tan(1/2*d*x)^2*tan(1/2*c)^2 - a^2*d^4*x^2*imag_part(cos_inte gral(d*x)) + a^2*d^4*x^2*imag_part(cos_integral(-d*x)) - 2*a^2*d^4*x^2*sin _integral(d*x) + 4*a*b*d^2*x^2*imag_part(cos_integral(d*x))*tan(1/2*d*x)^2 - 4*a*b*d^2*x^2*imag_part(cos_integral(-d*x))*tan(1/2*d*x)^2 + 8*a*b*d...
Timed out. \[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^3} \, dx=\int \frac {\sin \left (c+d\,x\right )\,{\left (b\,x^2+a\right )}^2}{x^3} \,d x \]